﻿@{
    Layout = null;
}
@using System.Web.Helpers
<!DOCTYPE html>

<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" style="min-height:100%;">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <title>宁波电商经济创新园区</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta content="" name="description" />
    <meta content="" name="author" />
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
    <link href="/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css" />
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
    <link href="../../assets/admin/pages/css/login-soft.css" rel="stylesheet" type="text/css" />
    <!-- END PAGE LEVEL SCRIPTS -->
    <!-- BEGIN THEME STYLES -->
    <link href="/assets/global/css/components.css" id="style_components" rel="stylesheet" type="text/css" />
    <link href="/assets/global/css/plugins.css" rel="stylesheet" type="text/css" />
    <link href="/assets/admin/layout/css/layout.css" rel="stylesheet" type="text/css" />
    <link href="/assets/admin/layout/css/themes/darkblue.css" rel="stylesheet" type="text/css" id="style_color" />
    <link href="/assets/admin/layout/css/custom.css" rel="stylesheet" type="text/css" />
    <!-- END THEME STYLES -->
    <link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body onkeypress="keyPress()" class="login" style="background:url(/img/mybg.jpg) no-repeat left bottom; background-color:#1F7D79;">


    <div style=" width: 1280px; margin: 0 auto; padding-left: 60px;">
        <!-- BEGIN LOGO -->
        <div class="logo">

        </div>
        <!-- END LOGO -->
        <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
        <div class="menu-toggler sidebar-toggler">
        </div>
        <div style="background:url(/img/yqlogo.png) no-repeat center center; width: 535px; height:142px;margin: 0px;float:left; "></div>
        <!-- END SIDEBAR TOGGLER BUTTON -->
        <!-- BEGIN LOGIN -->
        <div class="content" style="margin:0px;float:right;">
            <!-- BEGIN LOGIN FORM -->
            <form class="login-form" id="login_form" action="" method="post" style="display: block;">
                <h3 class="form-title">欢迎登录电商经济创新园区</h3>
                <div class="alert alert-danger display-hide">
                    <button class="close" data-close="alert"></button>
                    <span>
                        欢迎登录电商经济创新园区
                    </span>
                </div>
                <div class="form-group">
                    <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                    <label class="control-label visible-ie8 visible-ie9">请输入用户名(社会信用代码)</label>
                    <div class="input-icon">
                        <i class="fa fa-user"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入用户名(社会信用代码)" name="username" id="username" style=" opacity: 0.5;">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label visible-ie8 visible-ie9">请输入密码</label>
                    <div class="input-icon">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="请输入密码" name="password" id="password" style=" opacity: 0.5;">
                    </div>
                </div>
                <div class="form-group" style="height:34px;">
                    <label class="control-label visible-ie8 visible-ie9">请输入验证码</label>
                    <div class="input-icon col-xs-8" style="padding: 0px 0px;">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入验证码" name="ValidateCode" id="ValidateCode" style=" opacity: 0.5;">
                    </div>
                    <div class="col-xs-4 text-center" style="padding-top:1px; padding-right:0px;text-align:right;">
                        <img src="@Url.Content("~/index/GetValidateCodeImage")" onclick="chg1()" id="ValidateCode1" alt="" height="34px" width="60px">
                    </div>
                </div>
                <div class="form-actions">
                    <label class="checkbox">
                        @Html.CheckBox("remember", new { @style = "width:16px;height:16px;display:inline-block;margin-top:0px;opacity: 0.5;position:relative;margin-left:2px;vertical-align:sub;border-color:transparent;" })
                        &nbsp;记住我
                    </label>
                    <button id="Loginbtn" type="button" class="btn blue pull-right">
                        登陆 <i class="m-icon-swapright m-icon-white"></i>
                    </button>
                </div>

                <div class="forget-password">
                    <h4>忘记密码? </h4>
                    <p>
                        点击 <a href="javascript:;" id="forget-password">
                            这里
                        </a>
                        重置密码
                    </p>
                </div>
                <div class="forget-password" style="float:right;">

                    <p>
                        <a href="@Url.Action("Index", "Index")" style="color:white;">
                            园区端登陆
                        </a>

                    </p>
                </div>
                <div class="create-account">
                    <p>
                        新用户 ?&nbsp;点击 <a href="javascript:;" id="register-btn">
                            这里
                        </a>  注册
                    </p>
                </div>
            </form>
            <!-- END LOGIN FORM -->
            <!-- BEGIN FORGOT PASSWORD FORM -->
            <form class="forget-form" action="index.html" method="post" novalidate="novalidate" id="pass_form">
                <h3 class="form-title">重置密码</h3>
                <p> 如果你忘记登录密码，填写企业登记的用户名和短信号码获取验证码，填写正确的验证码后,点击重置密码进入重置页面</p>
                <div class="alert alert-danger display-hide">
                    <button class="close" data-close="alert"></button>
                    <span>
                        重置密码
                    </span>
                </div>
                <div class="form-group">
                    <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                    <label class="control-label visible-ie8 visible-ie9">请输入用户名(社会信用代码)</label>
                    <div class="input-icon">
                        <i class="fa fa-user"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入用户名(社会信用代码)" id="usernamePWD" name="usernamePWD" style=" opacity: 0.5;">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label visible-ie8 visible-ie9">请输入你登记的手机号码</label>
                    <div class="input-icon">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入你登记的手机号码" id="userPhone" name="userPhone" style=" opacity: 0.5;">
                    </div>
                </div>
                <div class="form-group" style="height:34px;">
                    <label class="control-label visible-ie8 visible-ie9">请输入验证码</label>
                    <div class="input-icon col-xs-8" style="padding: 0px 0px;">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入验证码" id="ValidateCode3i" name="ValidateCode3i" style=" opacity: 0.5;">
                    </div>
                    <div class="col-xs-4 text-center" style="padding-top:1px; padding-right:0px;text-align:right;">
                        <img src="@Url.Content("~/index/GetValidateCodeImage3")" onclick="chg3()" id="ValidateCode3" alt="" height="34px" width="60px">
                    </div>
                </div>

                <div class="form-group" style="height:34px;">
                    <label class="control-label visible-ie8 visible-ie9">请输入短信验证码</label>
                    <div class="input-icon col-xs-6" style="padding: 0px 0px;">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="短信验证码" id="DXYZM" name="DXYZM" style=" opacity: 0.5;">
                    </div>
                    <div class="col-xs-6 text-center" style="">
                        <button type="button" id="myButton" data-loading-text="短信已发送" class="btn btn-primary ">
                            获取短信验证码
                        </button>
                    </div>
                </div>
                <div class="form-actions">
                    <button type="button" id="back-btn" class="btn">
                        <i class="m-icon-swapleft"></i>返回
                    </button>
                    <button type="button" id="rstPWD" class="btn blue pull-right">
                        重置密码 <i class="m-icon-swapright m-icon-white"></i>
                    </button>
                </div>
            </form>
            <!-- END FORGOT PASSWORD FORM -->
            <!-- BEGIN REGISTRATION FORM -->
            <form class="register-form" action="index.html" method="post" novalidate="novalidate" style="display: none;" id="reg_form">
                <h3 class="form-title">新用户注册</h3>
                <div class="alert alert-danger display-hide">
                    <button class="close" data-close="alert"></button>
                    <span>
                        新用户注册
                    </span>
                </div>
                <div class="form-group">
                    <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                    <label class="control-label visible-ie8 visible-ie9">请输入用户名(社会信用代码)</label>
                    <div class="input-icon">
                        <i class="fa fa-user"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入用户名(社会信用代码)" id="r_username" name="r_username" style=" opacity: 0.5;">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label visible-ie8 visible-ie9">请输入密码</label>
                    <div class="input-icon">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="请输入密码" id="r_password" name="r_password" style=" opacity: 0.5;">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label visible-ie8 visible-ie9">重复密码</label>
                    <div class="controls">
                        <div class="input-icon">
                            <i class="fa fa-check"></i>
                            <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="重复密码" id="r_password2" name="r_password2" style=" opacity: 0.5;">
                        </div>
                    </div>
                </div>
                <div class="form-group" style="height:34px;">
                    <label class="control-label visible-ie8 visible-ie9">请输入验证码</label>
                    <div class="input-icon col-xs-8" style="padding: 0px 0px;">
                        <i class="fa fa-lock"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="请输入验证码" name="ValidateCode1" id="ValidateCode1" style=" opacity: 0.5;">
                    </div>
                    <div class="col-xs-4 text-center" style="padding-top:1px; padding-right:0px;text-align:right;">
                        <img src="@Url.Content("~/index/GetValidateCodeImage1")" onclick="chg2()" id="ValidateCode2" alt="" height="34px" width="60px">
                    </div>
                </div>
                <div class="form-actions">
                    <button id="register-back-btn" type="button" class="btn">
                        <i class="m-icon-swapleft"></i> 返回
                    </button>
                    <button type="button" id="regbtn" class="btn blue pull-right">
                        注册 <i class="m-icon-swapright m-icon-white"></i>
                    </button>
                </div>
            </form>
            <!-- END REGISTRATION FORM -->
        </div>
        <!-- END LOGIN -->
        <!-- BEGIN COPYRIGHT -->
        <!-- END COPYRIGHT -->
        <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
        <!-- BEGIN CORE PLUGINS -->
        <!--[if lt IE 9]>
        <script src="../../assets/global/plugins/respond.min.js"></script>
        <script src="../../assets/global/plugins/excanvas.min.js"></script>
        <![endif]-->
        <script src="../../assets/global/plugins/jquery.min.js" type="text/javascript"></script>
        <script src="../../assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
        <script src="../../assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="../../assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
        <script src="../../assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
        <script src="../../assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>



        <!-- END PAGE LEVEL SCRIPTS -->
        <script>

            function keyPress() {
                if (event.keyCode && event.keyCode == 13) {

                    $("#Loginbtn").trigger("click");

                }
            }
            jQuery(document).ready(function () {


                if ($.cookie("rmbUser") == "true") {
                    // alert(1);
                    $("#remember").attr("checked", true);
                    $("#username").val($.cookie("userName"));
                    $("#password").val($.cookie("passWord"));

                } else {
                    $("#remember").removeAttr("checked")
                    $("#username").val("");
                    $("#password").val("");
                }
                //  Metronic.init(); // init metronic core components
                //Layout.init(); // init current layout
                //Login.init();
                //Demo.init();
                // init background slide images
                $("#myButton").button();
                $('#myButton').on('click', function () {
                    var usernamePWD = $("#usernamePWD").val();
                    var userPhone = $("#userPhone").val();
                    var ValidateCode3 = $("#ValidateCode3i").val();
                    var that = this;
                    $.ajax({
                        type: "POST",
                        url: '@Url.Content("~/index/SendPhone")',
                        data: {

                            usernamePWD: usernamePWD, userPhone: userPhone, ValidateCode3: ValidateCode3
                        },
                        error: function (data) {
                            alert(data);

                        },
                        success: function (data) {
                            if (data == "ok") {
                                var $btn = $(that).button('loading').delay(60000).queue(function () {
                                    $(that).button('reset');
                                });
                            } else {


                                alert(data);

                            }

                        }
                    });


                })


                $("#rstPWD").click(function () {

                    var that = this;
                    $(this).attr("disabled", "disabled");
                    $.ajax({
                        type: "POST",
                        url: '@Url.Content("~/index/ResetPWD")',
                        data: $('#pass_form').serialize(),
                        error: function (data) {
                            alert(data);
                            $(that).removeAttr("disabled");
                            window.location.reload();
                        },
                        success: function (data) {


                            $(that).removeAttr("disabled");

                            if (data == "重置成功") {
                                alert("重置成功,请重新修改密码");
                                window.location.href = '@Url.Action("Index", "Password", new {Type=1 })';
                            } else {
                                alert(data);

                            }
                        }

                    });


                })
                $("#Loginbtn").click(function () {

                    var that = this;
                    $(this).attr("disabled", "disabled");
                    $.ajax({
                        type: "POST",
                        url: '@Url.Content("~/index/Login")',
                        data: $('#login_form').serialize(),
                        error: function (data) {
                            alert(data);
                            $(that).removeAttr("disabled");
                            window.location.reload();
                        },
                        success: function (data) {


                            $(that).removeAttr("disabled");

                            if (data == "登陆成功") {

                                window.location.href = '@Url.Action("Index","Home")';
                            } else if (data == "登陆成功,欢迎进入园区段管理系统") {

                                window.location.href = '@Url.Action("Index", "AdminFront")';
                            } else {
                                alert(data);

                            }
                        }

                    });


                });
                $("#regbtn").click(function () {

                    var that = this;
                    $(this).attr("disabled", "disabled");
                    $.ajax({
                        type: "POST",
                        url: '@Url.Content("~/index/RegUser")',
                        data: $('#reg_form').serialize(),
                        error: function (data) {
                            alert(data);
                            $(that).removeAttr("disabled");
                            window.location.reload();
                        },
                        success: function (data) {


                            $(that).removeAttr("disabled");

                            if (data == "注册成功") {

                                window.location.href = '@Url.Action("Index", "Home")';
                            } else {
                                alert(data);

                            }
                        }

                    });


                })
                jQuery('#forget-password').click(function () {
                    jQuery('.login-form').hide();
                    jQuery('.forget-form').show();
                });

                jQuery('#back-btn').click(function () {
                    jQuery('.login-form').show();
                    jQuery('.forget-form').hide();
                });
                jQuery('#register-btn').click(function () {
                    jQuery('.login-form').hide();
                    jQuery('.register-form').show();
                });

                jQuery('#register-back-btn').click(function () {
                    jQuery('.login-form').show();
                    jQuery('.register-form').hide();
                });
                chg1();
                chg2();
                chg3();
            });



            function chg1() {

                $("#ValidateCode1").attr("src", '@Url.Content("~/index/GetValidateCodeImage")' + "?s=" + (new Date().getTime()));

            }
            function chg2() {

                $("#ValidateCode2").attr("src", '@Url.Content("~/index/GetValidateCodeImage1")' + "?s=" + (new Date().getTime()));

            }
            function chg3() {

                $("#ValidateCode3").attr("src", '@Url.Content("~/index/GetValidateCodeImage3")' + "?s=" + (new Date().getTime()));

            }
        </script>
        <!-- END JAVASCRIPTS -->
        <!-- END BODY -->
    </div>
</body>

<!-- END BODY -->
</html>
